<template>
  <div class="head">
    <div @click="tab">
      <span class="tit">我的任务</span>
      <div>
        <button id="1" :class="id === '1' ? 'active' : ''" class="title">
          待认领(4)
        </button>
      </div>
      <div>
        <button id="2" :class="id === '2' ? 'active' : ''" class="title">
          处理中(0)
        </button>
      </div>
      <div>
        <button id="3" :class="id === '3' ? 'active' : ''" class="title">
          总部介入中(0)
        </button>
      </div>
      <div>
        <button id="4" :class="id === '4' ? 'active' : ''" class="title">
          已完结(0)
        </button>
      </div>
      <div>
        <button id="5" :class="id === '5' ? 'active' : ''" class="title">
          我发起的(0)
        </button>
      </div>
      <span class="tit">本网点任务</span>
      <div>
        <button id="6" :class="id === '6' ? 'active' : ''" class="title">
          收到的任务
        </button>
      </div>
      <div>
        <button id="7" :class="id === '7' ? 'active' : ''" class="title">
          发起的任务
        </button>
      </div>
    </div>
    <rogerThat v-if="id === '6'" style="width: 100%" />
  </div>
</template>

<script>
import rogerThat from "@/views/Customer/rogerThat/index";

export default {
  name: "Dashboard",
  components: {
    rogerThat,
  },
  data() {
    return {
      id: "6",
    };
  },

  computed: {},

  created() {},

  methods: {
    tab(e) {
      if (e.target.id) {
        this.id = e.target.id;
      }
    },
  },
};
</script>
<style scoped lang="scss">
.head {
  margin-top: 30px;
  display: flex;
  padding-right: 30px;
  .title {
    width: 284px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 18px;
    font-family: Source Han Sans CN;
    // font-weight: 600;
    color: #333333;
    border: 1px #fff solid;
    // background-color: #fff;
    background: none;
    margin: 20px 0;
    text-align: left;
    padding-left: 105px;
  }
  .active {
    color: #2087d0;
    margin: 20px 0;
    // background: #e7f3fb;
  }
  .tit {
    margin-left: 90px;
    font-size: 16px;
    font-weight: 600;
  }
}
</style>
